package com.kun.service;

import com.kun.mapper.AdminMapper;
import com.kun.pojo.Admin;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

/**
 * @Version:v1.0
 * @Author: 鲁坤
 * @Date: 2021-04-08
 * @ClassName: AdminImpl
 * @Description: TODO
 */
@Service("AdminService")
public class AdminImpl implements AdminService{
    @Autowired
    private AdminMapper adminMapper;
    @Override
    @Cacheable(value = "admin",key = "#username")
    public Admin queryAdminByUsername(String username) {
        return adminMapper.queryAdminByUsername(username);
    }
}
